package com.dajiba.demo;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;

import androidx.annotation.Nullable;

public class CustomDrawRoundRect extends BaseCustomView {

    public CustomDrawRoundRect(Context context) {
        super(context);
    }

    public CustomDrawRoundRect(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public CustomDrawRoundRect(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        RectF rectF = new RectF(100, 200, 700, 900);
        mPaint.setAntiAlias(true);
        canvas.drawRoundRect(rectF, 50, 50, mPaint);
    }
}
